import React from 'react';
import {
  StyleSheet,
  Text,
  View,
  SafeAreaView,
  Button,
  Pressable,
} from 'react-native';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';

const Purse = ({navigation}) => {
  return (
    <SafeAreaView>
      <View style={styles.container}>
        <View style={styles.title}>
          <Text style={styles.titleText}>我的錢包</Text>
        </View>
        <View style={styles.addressList}>
          <View style={styles.address}>
            <Text style={styles.addressText1}>USDT 錢包地址</Text>
            <Text style={styles.addressText2}>
              TJtEmkvttLEjpNcy4QXSwVWr3FagXBgTaa
            </Text>
            <Pressable style={styles.heartActive}>
              <MaterialCommunityIcons
                name="cards-heart"
                color="#f00"
                size={28}
              />
            </Pressable>
          </View>
          <View style={styles.address2}>
            <Text style={styles.addressText1}>USDT 錢包地址</Text>
            <Text style={styles.addressText2}>
              TJtEmkvttLEjpNcy4QXSwVWr3FagXBgTaa
            </Text>
            <Pressable style={styles.heart}>
              <MaterialCommunityIcons
                name="cards-heart-outline"
                color="#fff"
                size={28}
              />
            </Pressable>
          </View>
        </View>
        <Pressable
          style={styles.operation}
          onPress={() => navigation.navigate('PurseAddScreen')}>
          <MaterialCommunityIcons name="plus-thick" color="#fff" size={44} />
          <Text style={styles.operationText}>新增錢包</Text>
        </Pressable>
      </View>
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    paddingLeft: 50,
    paddingRight: 50,
  },
  title: {
    height: 75,
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
  },
  titleText: {
    color: '#17141a',
    fontWeight: 'bold',
    fontSize: 20,
  },
  addressList: {},

  address: {
    height: 110,
    display: 'flex',
    alignItems: 'center',
    backgroundColor: '#6096E6',
    justifyContent: 'center',
    borderRadius: 10,
    paddingBottom: 10,
    marginBottom: 10,
    position: 'relative',
  },
  address2: {
    height: 110,
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    borderRadius: 10,
    paddingBottom: 10,
    marginBottom: 10,
    position: 'relative',
    backgroundColor: '#FF9800',
  },
  addressText1: {
    fontSize: 22,
    lineHeight: 30,
    color: 'white',
    fontWeight: 'bold',
  },
  addressText2: {
    fontSize: 12,
    lineHeight: 30,
    color: 'white',
    fontWeight: 'bold',
  },
  heartActive: {
    position: 'absolute',
    left: 10,
    top: 5,
  },
  heart: {
    position: 'absolute',
    left: 10,
    top: 5,
  },

  operation: {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    flexDirection: 'row',
    height: 110,
    backgroundColor: '#CCCCCC',
    borderRadius: 8,
  },
  operationText: {
    fontSize: 26,
    fontWeight: 'bold',
    color: 'white',
  },
});

export default Purse;
